<template>
	<view class="app">
		<image class="address-img" src="../../static/address-top.png"></image>
		<view class="container" style="margin-top: 0;">
			<view class="address-item">
				<view class="address-1">
					<view class="address-label">默认</view>
					江苏苏州市吴中区
				</view>
				<view class="hengxbuj">
					<view>
						<view class="address-2">若水路388号纳米大学城E栋1203室</view>
						<view class="address-3">
							<text>宋润生</text>
							180****5678
						</view>
					</view>
					<image class="xiayib" src="../../static/go.png"></image>
				</view>
			</view>
		</view>
		<view class="container">
			<view class="cart-item" v-for="index in 2">
				<view class="goods-list">
					<view class="goods-item">
						<image class="goods-img" src="../../static/dengl.jpg"></image>
						<view class="goods-body">
							<view class="goods-body-top">
								<view class="goods-name two-line">飘柔洗发水飘柔洗发水飘柔洗发水飘柔洗发水</view>
								<view class="goods-label-box">
									<view class="goods-label">450ml</view>
								</view>
							</view>
							<view class="goods-bottom">
								<view class="goods-price">
									<text>¥</text>
									19.9
								</view>
								<view class="num-box">
									<text>x</text>
									12
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
			<view class="list-box">
				<view class="list-item">
					<view class="list-left">配送方式</view>
					<view class="list-right">快递运输</view>
				</view>
				<view class="list-item">
					<view class="list-left">发货期</view>
					<view class="list-right">付款后7天内安排发货</view>
				</view>
				<view class="list-item">
					<view class="list-left">订单留言</view>
					<view class="list-right"><input placeholder="选填，请先和商家协商一致" class="msg-input" /></view>
				</view>
			</view>
		</view>
		<view class="container goods-info">
			<view class="list-box">
				<view class="list-item">
					<view class="list-left">商品金额</view>
					<view class="list-right">¥19.9</view>
				</view>
				<view class="list-item">
					<view class="list-left">店铺活动</view>
					<view class="list-right">9折</view>
				</view>
				<view class="list-item">
					<view class="list-left">运费</view>
					<view class="list-right">¥0.00</view>
				</view>
				<view class="list-item">
					<view class="list-left">缴纳税额</view>
					<view class="list-right">¥3.00</view>
				</view>
				<view class="list-item">
					<view class="list-left">优惠券</view>
					<view class="list-right arrow" @click="openCoupon()">
						<text class="right-text">无可用优惠券</text>
						<image class="xxiayb" src="../../static/go.png"></image>
					</view>
				</view>
				<view class="list-item">
					<view class="list-left">发票</view>
					<view class="list-right arrow" @click="openInvoice()">
						<text class="right-text">本次不开具发票</text>
						<image class="xxiayb" src="../../static/go.png"></image>
					</view>
				</view>
			</view>
			<view class="price-box">
				<view class="price-label">合计：</view>
				<view class="total-price">¥39.8</view>
			</view>
		</view>
		<view class="footer">
			<view class="footer-1">共1件，</view>
			<view class="footer-2">合计：</view>
			<view class="footer-3">
				<text>¥</text>
				39.8
			</view>
			<view class="dingdanann" @click="tijdingd">提交订单</view>
		</view>
	</view>
</template>
<script>
export default {
	data() {
		return {
			buttonStyle: {
				width: '196rpx',
				height: '68rpx',
				backgroundColor: '#E23C2B',
				fontSize: '26rpx',
				fontWeight: 'bold'
			}
		};
	},
	onLoad(){
		// setTimeout(()=>{
		// 	this.openInvoice()
		// },500)
	},
	methods:{
		tijdingd(){
			uni.navigateTo({
				url:'../payqueren/payqueren'
			})
		}
	}
};
</script>
<style scoped lang="scss">
page {
	background-color: #f4f4f4;
	padding-bottom: 150rpx;
}
.address-img {
	display: block;
	width: 94%;
	height: 6rpx;
	margin: 20rpx auto 0;
	position: relative;
	top: 5rpx;
}
.container {
	background-color: #fff;
	border-radius: 20rpx;
	margin: 20rpx;
}
.address-item {
	padding: 26rpx;
	// height: 180rpx;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	position: relative;
	.address-1 {
		display: flex;
		align-items: center;
		font-size: 24rpx;
		color: #333333;
		.address-label {
			font-size: 22rpx;
			padding: 2rpx 10rpx;
			border-radius: 4rpx;
			background-color: #007AFF;
			color: #fff;
			transform: scale(0.8);
		}
	}
	.hengxbuj{
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin-top: 20rpx;
		.address-2 {
			color: #222222;
			font-size: 32rpx;
			font-weight: bold;
			width: calc(100%);
		}
		.xiayib{
			width: 30rpx;
			height: 30rpx;
		}
		.address-3 {
			color: #333;
			font-size: 24rpx;
			text {
				margin-right: 20rpx;
			}
		}
	}
	.address-2 {
		color: #222222;
		font-size: 32rpx;
		font-weight: bold;
		width: calc(100% - 100rpx);
	}
	.xiayib{
		width: 30rpx;
		height: 30rpx;
	}
	.address-3 {
		color: #333;
		font-size: 24rpx;
		text {
			margin-right: 20rpx;
		}
	}
}
.arrow-right {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	right: 26rpx;
	color: #b2b2b2;
}
.cart-item {
	margin: 0 25rpx;
	border-radius: 20rpx;
	background-color: #fff;
	.cart-title {
		display: flex;
		align-items: center;
		padding: 20rpx 0 10rpx;
	}
	.activity-box {
		display: flex;
		align-items: center;
		font-size: 22rpx;
		color: #000;
		font-weight: bold;
		padding: 10rpx 20rpx 0 0;
		.activity-label {
			background-color: #007AFF;
			color: #fff;
			font-size: 22rpx;
			padding: 2rpx 10rpx;
			border-radius: 8rpx;
			transform: scale(0.9);
		}
	}
}
.goods-item {
	// height: 240rpx;
	padding: 30rpx 0;
	background-color: #fff;
	display: flex;
	align-items: center;
	.goods-img {
		width: 180rpx;
		height: 180rpx;
	}
	.goods-body {
		width: 460rpx;
		height: 180rpx;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		margin-left: 25rpx;
	}
	.goods-name {
		font-size: 26rpx;
		color: #333;
		line-height: 1.5;
		margin-bottom: 10rpx;
	}
	.goods-label-box {
		.goods-label {
			display: inline-block;
			width: 80rpx;
			height: 40rpx;
			line-height: 40rpx;
			border-radius: 20rpx;
			background-color: #f5f5f5;
			color: #797979;
			font-size: 20rpx;
			text-align: center;
			transform: scale(0.8);
			transform-origin: 0;
		}
	}
	.goods-bottom {
		display: flex;
		justify-content: space-between;
		.goods-price {
			font-size: 32rpx;
			color: #ff0000;
			font-weight: bold;
			text {
				font-size: 0.7em;
				margin-right: 5rpx;
			}
		}
		.num-box {
			text {
				padding-right: 5rpx;
			}
		}
	}
}
.goods-info{
	padding-top:30rpx;
	padding-bottom: 20rpx;
}
.list-box {
	.list-item {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 21rpx 26rpx;
		font-size: 24rpx;
		color: #222222;
		.msg-input {
			font-size: 24rpx;
			width: 500rpx;
			text-align: right;
		}
		.list-right {
			display: flex;
			align-items: center;
			.right-text {
				color: #b2b2b2;
			}
			.xxiayb{
				width: 30rpx;
				height: 30rpx;
			}
			&.arrow {
				position: relative;
				// padding-right: 30rpx;
				.arrow-right {
					right: 0;
					font-size: 22rpx;
					transform: translateY(-50%) scale(0.8);
				}
			}
		}
	}
}
.price-box {
	height: 84rpx;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	padding-right: 26rpx;
	.price-label {
		font-size: 24rpx;
		color: #222222;
	}
	.total-price {
		font-size: 26rpx;
		color:#19BE6B;
		font-weight: bold;
	}
}
.footer {
	height: 100rpx;
	position: fixed;
	left: 0;
	bottom: 0;
	width: 720rpx;
	display: flex;
	justify-content: flex-end;
	align-items: center;
	background-color: #fff;
	z-index: 555;
	padding-right: 30rpx;
	.footer-1 {
		color: #a0a0a0;
		font-size: 24rpx;
	}
	.footer-2 {
		color: #222222;
		font-size: 28rpx;
	}
	.footer-3 {
		color: #e23c2b;
		font-size: 28rpx;
		font-weight: bold;
		margin-right: 32rpx;
	}
	.dingdanann{
		width: 200rpx;
		height: 70rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		background: #ffaa00;
		color: #ffffff;
		border-radius: 35rpx;
		line-height: 70rpx;
		font-size: 28rpx !important;
		font-weight: bold !important;
	}
}
</style>
